#include "hangliu.h"
#include <AT89X52.h>
#define   RCLK   P1_5 
#define   SDATA  P1_6
#define   SCLK   P1_7
unsigned char hang[8]={0x01,0x02,0x04,0x08,0x10,0x20,0x40,0x80};
void SD(unsigned char Xd,unsigned char Yd)
{
    unsigned char i=0;
	RCLK=0;
    for(i=0;i<8;i++)
    {
    SDATA=Xd & 0x01;
    SCLK=1;
    SCLK=0;
    Xd=Xd>>1;
    }
    
    for(i=0;i<8;i++)
    {
    SDATA=Yd & 0x01;
    SCLK=1;
    SCLK=0;
    Yd=Yd>>1;
	}
    RCLK=1;
}

void hangliu ()
{
      while(1)
    {
    
    unsigned char i=0;
	for (i=0;i<8;i++)
	{
    SD(0x00,hang[i]) ;
    Delay();
	}
  
    
    }
}
